package com.emou.service;

import com.spring.dao.AdminDao;
import com.spring.dao.impl.AdminDaoImp;
import com.emou.model.Admin;

/**
 * Created by Emou on 2021/1/14
 */
public class AdminService {
    private AdminDao adminDao;

    public void setAdminDao(AdminDao adminDao) {
        this.adminDao = adminDao;
    }

    public void save(Admin admin) {
        adminDao.add(admin);
    }

    public static void main(String[] args) {
        AdminService service = new AdminService();
        service.setAdminDao(new AdminDaoImp());
        service.save(new Admin());
    }
}
